//var isIE = true;
var imgUp = "../images/arrowUp.gif" ;
var imgDn = "../images/arrowDn.gif" ;

//默认一点击head2
function init() {
	  document.onclick = doClick ;
	  expandIt("head2");
}

function expandIt( head ) {

	//console.log("head:" + head + ",fExpandOnly:" + fExpandOnly);
	
	var bulletImg ;
	//var allCol = "document." + ( isIE ? "all." : "" ) + head ;//"documnet.all.head"
	var parentDiv = document.getElementById(head + "Parent");
	var childDiv  = document.getElementById(head + "Child");
	bulletImg = parentDiv.getElementsByTagName("img");
		
		if(childDiv.style.display == "block") {
			childDiv.style.display	= "none" ;
			bulletImg.src = imgUp ;
			
		} else { 
			childDiv.style.display	= "block" ;
			bulletImg.src = imgDn;
		}
	   return false;  //这个return false 什么状态触发
}
	/*} else { //如果是IE，这段代码不会被执行
		if ( parentDiv )
			bulletImg = parentDiv.document.images[ 'imEx' ];
		if ( childDiv ) {
			if ( childDiv.visibility == "hide" ) {
				childDiv.visibility = "show" ;
				if ( bulletImg )
					bulletImg.src = imgDn ;
			} else if ( ! fExpandOnly )  {
				childDiv.visibility = "hide";
				if ( bulletImg )
					bulletImg.src = imgUp ;
			}
		}
	}
	return false ;	// cancels event 什么情况return false?
}*/

function doClick ( ) {
	el = event.srcElement;
	while ( el && el.tagName != "A" )  {
		el = el.parentElement ;
	}
	if ( ! el ) return ;
	if ( el.target != "main" ) return ;
	hiliteSel( el );	
}

var prevSel = null ;
function hiliteSel(selLink) {
	var selColor = "red" ;
	if(prevSel) {
		prevSel.style.color = prevSel.prevColor ;
	}
	prevSel = selLink ;
	prevSel.prevColor = selLink.style.color ;
	selLink.style.color = selColor ;
}


  //hiliteSel(ttt);
//  parent.frames("Main").location.href = "/gtc/programMgr.html";


/*if ( screen.colorDepth > 8 ) {
//	document.write( "<STYLE>BODY{background-image:url(/images/ai/tile_nav.jpg);}</STYLE>" );
}
var licenseID ='01-0006-0038-69648' ;
var pendingChanges =false ;*/


